/*
 * Copyright (c) 2011 CDO2 Limited.
 *
 * All rights reserved.
 */
package com.sicong.myproject.client;

import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * @author sicongz
 *
 */
public class Intro extends Content
{
    public Intro()
    {
        Label right = new Label("{}");
        right.setStyleName("bracket");
        
        Label hello = new Label("Hello, I'm Sicong.");
        hello.getElement().setId("hello");
        Label description = new Label("orem ipsum dolor sit amet, consectetur " +
        		                      "adipiscing elit. Pellentesque varius porta aliquam.");
        description.getElement().setId("description");
        
        VerticalPanel panel = new VerticalPanel();
        panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
        panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
        panel.add(hello);
        panel.add(description);
        
        HorizontalPanel wrapper = new HorizontalPanel();
        wrapper.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
        wrapper.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
        wrapper.setStyleName("wrapper");
        wrapper.add(panel);
        wrapper.add(right);
        
        initWidget(wrapper);
    }
}
